R Basics

Eric Dunford
April 3, 2017

Short Course on Statistical Programming in R

Overview

Today we'll cover:

  • Understanding R & R Studio
  • Objects/Data Structures
  • Packages
  • Data Basics (importing/exporting data, viewing data, subsetting/appending)

The main goal is get familiar with the R environment.

R in a Nut Shell

R is a statistical and graphical programming language that is based off a much older language called S. It's source code is written in C, Fortran, and R. And it's completely free under a GNU General Public License.

What this means for us:

  • No Barriers to Entry: easy to acquire, easy to contribute
  • Active Community: if you can think it, there is likely a package out there that does it.
  • Powerful and Adaptive: build an estimator from scratch, scrape a web-site, automate the coding of a dataset. All is within one's reach.

Why use R?

R offers a powerful way to

  • analyze data
  • clean excel spreadsheets
  • migrate projects across platforms
  • format and clean text
  • manage any data source
  • produce compelling graphics and maps

Applied Example 2

Return to your R Studio session and open basics_script_part2.R.

Further References

There are some great resources out there to help you climb the R learning curve.

Tomorrow